home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
UPDN.TAS
< prev
next >
Wrap
Text File
|
1992-04-11
|
2KB
|
68 lines
{ *** UPDN.TAS *** script by JK Leibovitz P#hnhp08a ***
(E-mail initial touch up by Martin and room for
improvements and inspired by Tom Rategan's hard work
and unselfishness)
Calculates Up/Down Volume based on 50 days volume on up
days divided by volume on down days and tabulates at one
week back intervals. (Make necessary adjustments for 4 day
weeks and can be calculated on Thursdays,Fridays or any
other day). Figures of up/dn individual stocks also on Investor
Business Daily News charts, but an old indicator
used by many technicians with various number of days. }
#MAX_QUOTES 150
#OUTPUT_FILE 'updn.LST'
if quote_count < 150 then return;
If first_ticker then
writeln ( 'Ticker -8 -7 -6 -5 -4 -3 -2 -1 U/D
')
;
VOLP: array; {volumeplus}
VOLM: array; {volumeminus}
tvolp: array; {total v+}
tvolm: array; {total v-}
DIFR: array;
DIFR=ROC(c,1,'$');
for i = 1; i <= quote_count; i = i+1;
begin
if DIFR[i] > 0 then
VOLP[i] = V[i];
else
VOLP[i] = 0;
if DIFR[i] < 0 then
VOLM[i] = V[i];
else
VOLM[i] = 0;
end;
tvolp = SUM(VOLP,50);
tvolm = SUM(VOLM,50);
F1=DIV(tvolp,tvolm); {this is the U/D factor}
F1=P;
UD1: number;
UD2: number;
UD3: number;
UD4: number;
UD5: number;
UD6: number;
UD7: number;
UD8: number;
UD1 = P[-5];
UD2 = P[-10];
UD3 = P[-15];
UD4 = P[-20];
UD5 = P[-25];
UD6 = P[-30];
UD7 = P[-35];
UD8 = P[-40];
end;
{ if F1 > 1.7 then } {if you want to use this filter=optional=open brackets}
begin
sortout (ticker, UD8, UD7, UD6, UD5, UD4, UD3, UD2, UD1, F1);
:printF1
if last_ticker
begin
Sorton (1,'a');
Sortprint('%s %2.1f %2.1f %2.1f %2.1f %2.1f %2.1f %2.1f %2.1f %2.1f
');
end;